#include "point.h"

void Point::setX(int x) {
    this -> x = x;
}

void Point::setY(int y) {
    this -> y = y;
}

int Point::getX() {
    return this -> x;
}

int Point:: getY() {
    return this -> y;
}

Point operator+ (Point p1, Point p2) {
    return Point(p1.getX() + p2.getX(), p1.getY() + p2.getY());
}

Point operator- (Point p1, Point p2) {
    return Point(p1.getX() - p2.getX(), p1.getY() - p2.getY());
}

ostream & operator<< (ostream &cout, Point p) {
    cout << "{ x = " << p.getX() << ", y = " << p.getY() << " }";
    return cout;
}
